package edu.study.user.api;

import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import edu.study.api.common.dto.BaseRespDto;
import edu.study.api.common.dto.PageRespDto;
import edu.study.api.common.dto.RespDto;
import edu.study.user.api.dto.DomainDto;
import edu.study.user.api.req.domain.AddDomainReq;
import edu.study.user.api.req.domain.DeleteDomainReq;
import edu.study.user.api.req.domain.ModifyDomainReq;
import edu.study.user.api.req.domain.ModifyDomainStatusReq;
import edu.study.user.api.req.domain.QueryDomainPageListReq;
import edu.study.user.api.req.domain.QueryDomainReq;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 * 1.要么没有入参，要么封装成req对象
 * 2.返回类型：BaseRespDto RespDto<T> PageRespDto<T> 三种
 */
@RequestMapping("/api/user/domainApi")
@Api(value = "/api/user/domainApi", tags = { "租户相关接口-1.0" })
public interface DomainApi {
	
    @ApiOperation(value = "新增租户")
    @RequestMapping(value = "addDomain", method = {RequestMethod.POST})
    BaseRespDto addDomain(@RequestBody AddDomainReq req);
    
    @ApiOperation(value = "删除租户")
    @RequestMapping(value = "deleteDomain", method = {RequestMethod.POST})
    BaseRespDto deleteDomain(@RequestBody DeleteDomainReq req);
    
    @ApiOperation(value = "修改租户")
    @RequestMapping(value = "modifyDomain", method = {RequestMethod.POST})
    BaseRespDto modifyDomain(@RequestBody ModifyDomainReq req);
    
    @ApiOperation(value = "失效/生效")
    @RequestMapping(value = "modifyDomainStatus", method = {RequestMethod.POST})
    BaseRespDto modifyDomainStatus(@RequestBody ModifyDomainStatusReq req);
    
    @ApiOperation(value = "查询租户")
    @RequestMapping(value = "queryDomain", method = {RequestMethod.POST})
    RespDto<DomainDto> queryDomain(@RequestBody QueryDomainReq req);
    
    @ApiOperation(value = "分页查询租户")
    @RequestMapping(value = "queryDomainPageList", method = {RequestMethod.POST})
    PageRespDto<DomainDto> queryDomainPageList(@RequestBody QueryDomainPageListReq req);    
}
